#ifndef __STACK_H__
#define __STACK_H__

#include "list.h"
//define stack return code
#define STACK_OK        0
#define STACK_FAIL      -1


//interface (operation of stack)

int init(list_t *); 
int push(list_t *, list_t *);  
list_t *pop(list_t *, int *errorCode);
int isEmpty(list_t *stack);
// return 1 if node is contained in stack, 
// where compareFunc is your compare funtion.
// compareFunc return 0 if key of elementNode == key (integer, float or string)  
int isExist(list_t *stack, void *key, int (*compareFunc)(void *elementNode, void *key));

#endif